<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      background-color: orange;
    }

    .p {
      width: 50vw;
      height: 50vh;
      background-color: pink;
      font-size: 3em;
    }
  </style>

</head>

<body>
  <p class="p">P 标签的宽度为 50vw</p>

</body>

</html>